using UnityEngine;
using System;
using System.Collections;
using LitJson;
public class test2 : test1 {
	Coroutine aa;
	
 void Start() {
		float a = 1.5f;
		StartCoroutine(WaitAndPrint());
      	//IEnumerator  aa = this.Example();
		// aa.MoveNext();
		//print(aa.Current );
		//	aa.MoveNext();
		//print(aa.Current );
  //print("1");
   //print(aa.Current );
		//foreach (object i in aa)
		//	print (i);
   
    
   //print("2");
		//print(Example().MoveNext());
		
		String str = "{’name’:’cyf’,’id’:10,’items’:[{’itemid’:1001,’itemname’:’hello’},{’itemid’:1002,’itemname’:’hello2’}]}";              
		//*** 读取JSON字符串中的数据 *******************************            
		JsonData jd = JsonMapper.ToObject(str);

		// 数组 items 中项的数量 
		foreach (JsonData item in jd)
		// 遍历数组 items            
		{         
			//JsonData jdata = jd[item.Key.ToString()];
			DictionaryEntry fucka;
			
		}              
		
		//*** 将JsonData转换为JSON字符串 ***************************          
		
		String str2 = jd.ToJson();
		
		
    }
	/*public Transform target;
    public float speed;
    void Update() {
		Vector3 dir = target.transform.position - this.transform.position;
		dir.z = 0;
		print(dir);
		Quaternion rotation = Quaternion.LookRotation(new Vector3(0,0,1) , Vector3.Cross (new Vector3(0,0,1) , dir));
    transform.rotation =
          Quaternion.Slerp (this.transform.rotation, rotation, Time.time * speed);
    }*/
        IEnumerator WaitAndPrint() {
       print("a");
		yield return null;
		print("b");
		yield return null;
		print("c");
		yield break;
		print("d");
		yield return null;
    }	
	
	
	  IEnumerator Example() {
		int a = 0;
        print("Starting " + Time.time);
        yield return 1;
        print("Done " + Time.time);
		yield return 2;
    }
	

}
